<?php
class MY_Controller extends CI_Controller{
	var $_data = FALSE;
	var $container = "container";
	
	function __construct(){
		parent :: __construct();
		$this->load->helper(array("date", "form", "text", "url", "language"));
		$this->load->library(array("form_validation", "pagination", "session"));
		
	}
	
	public function display_view($path){
		$this->before_render();
		$this->_data['load_path'] = $path;
		$this->load->view('front_end/container', $this->_data);
	}
	
	public function display_admin($path){
		$this->before_render();
		$this->_data['load_path'] = $path;
		$this->load->view('admin/container', $this->_data);
	}
	
	function before_render() {
        
    }
}

class Admin_Controller extends MY_Controller {

    public function __construct() {
        parent :: __construct();
        $header['page'] = 'admin/header';
        $footer['page'] = "admin/footer";
        $this->_data['footer'] = $footer;
        $this->_data['header'] = $header;
    }

    function before_render() {
        
    }

}

class Frontend_Controller extends MY_Controller {

    public function __construct() {
        parent :: __construct();
        $header['page'] = 'front_end/header';
        $footer['page'] = 'front_end/footer';
        $this->_data['footer'] = $footer;
        $this->_data['header'] = $header;
      
        
    }

    function before_render() {
    
    }

}
